/*--------------------------------------------------------------
 * File: demo44.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 查找数组中最大的值
 * Version 0.1
 * Date 2022-05-29 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/
#include <stdio.h>

int main(int argc, char const *argv[])
{
    int array[] = {1,2,3,4,5,6,67,7,80};
    int loop = 0;
    int lagest = 0;

    lagest = array[0];
    for(loop=1; loop<sizeof(array)/sizeof(int); loop++)
    {
        if(lagest < array[loop])
        {
            lagest = array[loop];
        }
    }
    printf("最大值是%d\n",lagest);

    return 0;
}
